//
//  YMWebSocket.h
//  PinGJByOwnerSide
//
//  Created by lantaiyuan on 2017/11/13.
//  Copyright © 2017年 lantaiyuan. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger,YMWebSocketStatus){
    YMWebSocketStatusConnected,
    YMWebSocketStatusFailed,
    YMWebSocketStatusColosedByServer,
    YMWebSocketStatusColosedByUser,
    YMWebSocketStatusReceived
};

typedef void(^ConnectBlcok)(YMWebSocketStatus status, id message);

@interface YMWebSocket : NSObject
@property(nonatomic, copy) ConnectBlcok connectBlock;
+ (instancetype)sharedInstance;
- (void)connect;
- (void)close;
- (void)exit;
- (void)send:(id)msg;
@end
